<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateElRefundAmountTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('el_refund_amount', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('amount')->default(0); //金额,单位：分
            $table->integer('refund_id');   //售后ID
            $table->integer('order_id');  //订单ID
            $table->string('type'); //类型：目前是 cash,balance
            $table->timestamps();
            $table->softDeletes();

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('el_refund_amount');
    }
}
